import 'package:flutter/material.dart';
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
import 'package:tencent_cloud_chat_uikit/business_logic/separate_models/tui_chat_separate_view_model.dart';
import 'package:tencent_cloud_chat_uikit/business_logic/view_models/tui_chat_global_model.dart';

/// 二次确认弹窗
typedef MSDialogBuilder = Future<bool> Function(BuildContext context, {String desc, String content});

/// 转发消息二次确认弹窗
typedef ForwardMessageConfirmWidgetBuilder = Future<bool> Function(
  BuildContext context,
  bool merge,
  List<V2TimConversation> conversationList,
  List<V2TimMessage> selectMessages,
);

/// 显示Toast
typedef ShowToastBuilder = void Function(String msg);

/// 转发消息页面
typedef ToForwardMessagePage = Future<void> Function(
  ConvType convType,
  bool merge,
  TUIChatSeparateViewModel model,
);

/// 跳转自定义At页面
typedef ToAtMessagePage = Future<V2TimGroupMemberFullInfo?> Function(
  String? groupID,
  V2TimGroupInfo? groupInfo,
  List<V2TimGroupMemberFullInfo?>? groupMemberList,
  String? groupType,
);

/// 用户标签
typedef UserTagBuilder = Widget Function(
  BuildContext context,
  String userId,
);

/// 群公告
typedef GroupNoticeBar = Widget Function(BuildContext context, String notice);

/// 禁止输入框
typedef ForbiddenInputBuilder = Widget Function(BuildContext context, {required String forbiddenText});

/// 消息已读详情页
typedef MessageReadReceiptPage = Widget Function(
  BuildContext context, {
  Key? key,
  required V2TimMessage messageItem,
  required int unreadCount,
  required int readCount,
  required TUIChatSeparateViewModel model,
  void Function(String userID)? onTapAvatar,
});
